Repository navigation
repos: a submodule pin CI caught does not affect the verdict on ardupilot - #4
peterbarker wants to merge 5 commits into
Conversation
80dfa9b to
d6c4e56
Compare
Previous review (2026-11-30)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head Reviewed at b4fc04d; the PR head has since moved to d6c4e56, which this review does not cover. The rule makes sense, but its trigger can waive a pin that CI never actually checked. Should fix
Not fully reviewed: commits after b4fc04d, up to the current head d6c4e56. Head moved during review: observed |
e19dd24 to
175d29a
Compare
Previous review (2026-11-30)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head Reviewed at 175d29a, which is still the PR head. Since the last review, the note applies only to master PRs whose check-merge-commits failed on the reviewed head, and green, skipped or running jobs and API errors now get normal judgement. Those earlier gate problems are fixed, apart from the gap below. Should fix
Minor (1)
|
review_fixtures.workspace() put every test store under a hard-coded /data/review/supervisor-tests. That exists on the review box, where /tmp is RAM, but a GitHub runner cannot create /data, so every test built on it died in setUp: the store, supervisor, lock, guardian, gc, integration and pilot suites, 384 errors and no assertion failures. CI has been red on main for every push since the fixture arrived with slice one (fd8fac7, 2026-09-28), so it has not been gating anything since. The drain, gc, context and schema-description tests already read REVIEW_TEST_DIR, defaulting to /data/review. Make the shared fixture do the same, and set it to the runner's temp directory in the workflow. mutate.py runs the tests with a stripped environment, so pass the variable through to them when it is set. The box keeps its default. With REVIEW_TEST_DIR set, the whole suite passes locally: 997 tests in 23 files, on Python 3.12.
test_manifests_are_built_once_for_a_burst_of_refreshes marked its cache entry expired with a stamp of 0. The stamp is time.monotonic(), which counts from boot, and the entry lives MANIFEST_AGE (120 s), so on a machine up for less than two minutes 0 is still fresh and the second build never happens. The review box and long-running workstations never see that; a GitHub runner, booted moments before the tests, does - it was the one failure left once CI could run these tests again. Stamp it MANIFEST_AGE and a second before now instead. Reproduced and checked by running the test with monotonic() offset to 30 s after boot: fails before, passes after.
core() hid refuted outcomes but not merged ones, so every finding the
reconciliation folded into another was still listed on the page as an
item of its own, with its own blocking/actionable tag. The verdict
already ignores both (review_schema: outcomes not refuted or merged),
so the page disagreed with it. ardupilot#20834 generation 9 showed its
one pin blocker three times, as BLOCKING each time; APReview#4
generation 1 listed the cold pass's copy of primary:F2 as a third ISSUE
whose text said it had been "merged so that it is reported once".
Hide merged outcomes, and name each shown finding by its id, since the
rationales refer to one another that way ("same fix as primary:F1") and
the page gave no way to tell which item that was. A finding that others
were merged into lists them, following chains, so agreement between the
passes stays visible: "primary:F2 (also cold:F1)".
A render change needs nothing migrated: a pending comment checks its
section against a fresh render and repairs the page from the store when
it differs, and published pages keep verifying against their own
digests until next published.
Adds a render test built from those two reports and a rendermerged
mutation, which the test catches.
175d29a to
c7e75f5
Compare
Previous review (2026-11-30)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head Reviewed at c7e75f5, which is still the PR head. Since the last review, the pin waiver needs the check-merge-commits log to show a FAIL line for that exact pin, rather than just a red job, and the /data/review comment wording is fixed. Minor (1)
|
c7e75f5 to
f406f2f
Compare
f406f2f to
9fde886
Compare
Previous review (2026-11-30)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head Reviewed at 9fde886, which is still the PR head. Since the last review (at c7e75f5), the check-merge-commits log is read only for a PR that will be reviewed, and is cached per job, so the repeated download is fixed. Should fix
Minor (1)
|
The passes see CI as one state, failing, pending or passing, which cannot say whether ArduPilot's check-merge-commits job failed on a submodule pin or on any of its other dozen checks and steps. Its pin check also passes when GitHub's API errors (the workflow sets no GITHUB_TOKEN), so a red job does not show a pin was caught, and the passes have no network to read the log themselves. APReview#4 generation 2 found that gap in the pin rule that follows. A repository's entry may now name the job that runs that check (pin_check). When that job failed on the head being reviewed, discovery reads its log and adds ci.pin_check: the job, its state, and the pins its log reports as failed - commit, path, pinned sha prefix and why, as ahead, diverged, missing or other. Ahead matches both the checker's wording and the one it had before ArduPilot's 182796ab64f (2026-11-17), since CI runs the PR head's copy of the script and older branches still print "(it is ahead of master)". Only those fixed-format fields are kept, since the log echoes paths from the PR's own .gitmodules. failures is null when the log could not be read, and a job that did not fail is not read at all. Only ArduPilot/ardupilot names one. Like the thread, the log is read only for a PR that will be reviewed, not one reused at its published head, and the pins parsed from a job are kept for the rest of the discovery, since a finished job's log never changes; APReview#4 generation 3 found every discovery downloading it again. GitHub serves a job log through a redirect to a presigned blob-storage URL. The pinned connection refuses redirects off api.github.com, and must, since it would carry the token there, so GitHub.job_log() goes through gh, which follows it without sending the token. Checked against the real log of ardupilot#20834's check-merge-commits (job 141121645777): it yields exactly modules/mavlink@efd3b9f8df78, diverged, and skips the run's PASS and SKIP lines. A live ci() on that head through the production transport returns the same. Adds tests for each job state and for when the log is read, and pinfailonly, pinjobfailed, pinreuse, pincache and pinaheadold mutations, all caught.
…ilot On ArduPilot/ardupilot, the check-merge-commits job runs Tools/scripts/check_branch_conventions.py, whose check_submodule_references_exist fails a master-targeting PR whose submodule pin is not reachable from that submodule's default branch. When that check has failed on a pin, the review should rely on it rather than withhold ACCEPT for the same thing: a finding that rests only on that pin not yet being reachable is now neither blocking nor actionable, and the comment mentions it at most as one minor line. Only for a pin CI actually caught, as listed in ci.pin_check.failures, which discovery reads from that job's log. The job fails for many other reasons, and the check skips PRs to other branches, runs the PR head's copy of the script (so a branch from before 510556e359b, 2026-04-08, runs none) and passes when the GitHub API errors. Every pin not listed, and every pin when the log could not be read, is judged normally. So is a listed pin whose reason is missing (CI's "not found in canonical repo") or other: only a commit that exists in the submodule's repository but is not merged yet (ahead or diverged) is waived, and a commit the repository does not have still blocks: there is nothing to wait for. When the runner cannot fetch such a commit, 3e7401c on main already writes REQUEST CHANGES without running the models; if it does fetch it, this note keeps it blocking. CI and the runner both use the submodule URL in the PR head's .gitmodules, so a PR that points a submodule at its own fork has its pin checked against that fork. The waiver applies only when the PR leaves the submodule's URL unchanged; otherwise the pin is judged normally. APReview#4 generation 4 raised this. APReview's own reviews of this PR found both earlier wordings would claim CI enforcement where none happened: generation 1 keyed on the base branch having the check, generation 2 on the job having failed. Problems with what the pinned commit contains, or with the change that pins it, are judged as before and can still affect the verdict. Review this would have fixed: ArduPilot/ardupilot#20834, generation 9 (head 3721de5427), REQUEST CHANGES whose only blocker was modules/mavlink pinned to the unmerged ArduPilot/mavlink#528, while check-merge-commits was red for exactly that (run 46191040519, job 141121645777). Submodules of ardupilot keep their own notes and are unaffected.
9fde886 to
1eefa35
Compare
|
Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head Reviewed at 1eefa35, which is still the PR head. Since the last review (at 9fde886), the parser accepts the older '(it is ahead of master)' wording. The note and commit message now say CI and the runner use the same PR-head submodule URL, and they waive a pin only when that URL is unchanged. Note
|
A submodule pin CI caught does not affect the verdict on ardupilot
On ArduPilot/ardupilot, the
check-merge-commitsCI job (check_submodule_references_existinTools/scripts/check_branch_conventions.py) fails a master-targeting PR whose submodule pin is not reachable from that submodule's default branch. When that check has failed on a pin, APReview should rely on it rather than withhold ACCEPT for the same thing.The rule is a note on the
ArduPilot/ardupilotentry inrepos.json. A finding that rests only on such a pin not yet being reachable is now neither blocking nor actionable, and the comment mentions it at most as one minor line. Problems with what the pinned commit contains, or with the change that pins it, are judged as before.Only for a pin CI actually caught. That means a pin listed in
ci.pin_check.failures, which the runner reads from the job's log (next section). A red job alone is not enough: it fails for a dozen other reasons. The check also skips PRs to other branches, runs the PR head's copy of the script (so a branch from before ArduPilot/ardupilot@510556e359b runs none), and passes when the GitHub API errors, and the workflow sets noGITHUB_TOKEN. Every pin not listed, and every pin when the log could not be read, is judged normally. So is a listed pin whose reason ismissing(CI's "not found in canonical repo") orother. Only a commit that exists in the submodule's repository but is not merged yet (aheadordiverged) is waived. A commit the repository does not have still gets REQUEST CHANGES, since there is nothing to wait for. When the runner cannot fetch it, 3e7401c on main already writes REQUEST CHANGES without running the models. If the runner does fetch it, this note keeps it blocking. CI reads submodule URLs from the PR head's.gitmodules, as the runner does, so a PR that points a submodule at its own fork has its pin checked against that fork. The waiver applies only when the PR leaves the submodule's URL unchanged, as generation 4 suggested. APReview's own reviews of this PR found both earlier wordings would claim CI enforcement where none happened: generation 1 keyed on the base branch having the check, generation 2 on the job having failed.Review this would have fixed: #20834, generation 9. Its only blocker, the reason for REQUEST CHANGES, was
modules/mavlinkpinned to the unmerged ArduPilot/mavlink#528, whilecheck-merge-commitswas red for exactly that pin. With this rule the pin plays no part, and the verdict comes from its other findings alone.Discovery reads which pins CI's check failed
discovery: read which submodule pins CI's check failed. The passes saw CI as one state (failing, pending or passing) and have no network, so they could not tell a pin failure from any other failure in the job. A repository's entry may now name the job that runs the check (
pin_check; only ArduPilot/ardupilot does). When that job failed on the head being reviewed, discovery reads its log and addsci.pin_check: the job, its state, and the pins the log reports as failed, each with commit, path, pinned sha prefix and a reason (ahead, diverged, missing or other). "Ahead" also matches the checker's wording from before ArduPilot/ardupilot@182796ab64f (2026-11-17), "(it is ahead of master)". CI runs the PR head's copy of the script, so older branches still print it, as generation 4 found. Only those fixed-format fields are kept, because the log echoes paths from the PR's own.gitmodules.failuresis null when the log could not be read, and a job that did not fail is not read at all. As with the thread, the log is read only for a PR that will be reviewed, not one reused at its published head. The pins parsed from a job are kept for the rest of the discovery, because a finished job's log never changes. Generation 3 found every discovery downloading it again.GitHub serves a job log through a redirect to a presigned blob-storage URL. The pinned connection to api.github.com refuses that redirect, and must, since it would carry the token there. So
GitHub.job_log()goes throughgh, which follows the redirect without sending the token.Checked against the real log of #20834's
check-merge-commits: it yields exactlymodules/mavlink@efd3b9f8df78, diverged, and skips that run's PASS and SKIP lines. A liveci()on that head through the production transport returns the same. New tests cover each job state and when the log is read. Newpinfailonly,pinjobfailed,pinreuse,pincacheandpinaheadoldmutations are all caught.CI runs the whole suite again (two precursor commits)
CI has been red on every push to
mainsince 2026-09-28, so it has not been gating anything.review_fixtures.workspace()hard-coded/data/review/supervisor-tests, which a GitHub runner cannot create, so every store, supervisor, lock, guardian, gc, integration and pilot test died in setup with 384 errors. It now readsREVIEW_TEST_DIRlike the other tests already did, still defaulting to/data/review, and the workflow sets it to the runner's temp directory.mutate.pystrips the tests' environment, so it now passesREVIEW_TEST_DIRthrough when it is set.time.monotonic()stamp of 0. On a runner booted less thanMANIFEST_AGE(120 s) earlier, that entry is still fresh. The test now stamps it relative to now.With both fixes, CI runs and passes all 997 tests in all 23 files, the first green run since September.
Reports show a merged finding once
render: show a merged finding once, on the finding it was merged into. The report page hid refuted findings but not merged ones, so every finding the reconciliation folded into another was still listed as an item of its own, with its own BLOCKING or ISSUE tag. The verdict already ignores both, so the page disagreed with it. #20834 generation 9 showed its one pin blocker three times, each as BLOCKING. APReview#4 generation 1 listed the cold pass's copy of primary:F2 as a third ISSUE, whose own text said it had been merged so that it is reported once.
Merged findings are now hidden. Each shown finding is labelled with its id, because the rationales refer to one another that way ("same fix as primary:F1") and the page gave no way to tell which item that was. A finding that others were merged into lists them, following chains, so agreement between the passes stays visible, for example
primary:F2 (also cold:F1).Nothing needs migrating. A pending comment checks its section against a fresh render and repairs the page from the store when they differ, and published pages keep verifying against their own digests until they are next published. A new render test, built from those two reports, fails on the old renderer (six items, two of them BLOCKING) and passes now. A new
rendermergedmutation is caught by it.With everything in this PR, the suite is 1006 tests.
🤖 Generated with Claude Code